<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<script type="text/javascript" src="../images/jquery.js"></script>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="../styles/general.css" rel="stylesheet" type="text/css" />
<link href="../styles/main.css" rel="stylesheet" type="text/css" />
<!--<link href="http://www.fookii.com/images/pm/corp/v1/themes/css/pmst_latyout.css" rel="stylesheet" type="text/css" />-->
<script type="text/javascript" src="../images/jquery.js"></script>
<script type="text/javascript" src="../images/jquery.js"></script>
<script type="text/javascript" src="../images/unti.js"></script>
<title></title>
<style>
#table_info td {
	height:60px;
}
.tdone{
	text-align:right;
}
.tdtwo{
	text-indent:10px;
}
a.re_error {width:175px; height:20px;color: red; padding:0 3px;margin-left:10px; line-height:21px; background:url(../images/file/error.gif) no-repeat;cursor:pointer;float:left; }
input.error, textarea.error, select.error { border-color:#FB7E81 #FB7E81 #FB7E81 #FB7E81;background:url(../images/file/invalid_line.gif) bottom repeat-x;}
.popup_container{border:3px #E1E1E1 solid;text-align:left;font-family:Geneva, Arial, Helvetica, sans-serif;z-index:50;padding:5px}
.popup_container .popup_main{border:1px solid #A7A6A6;background:#FFF;color:#3F3F3F;word-wrap:break-word;word-break:break-all;overflow:hidden;width:310px}
.popup_container .popup_main .popup_title{width:100%;height:28px!important;line-height:28px!important;background:#F1F1F1;border-bottom:1px solid #DEDEDE;cursor:move}
.popup_container .popup_main .popup_title h3{font-size:14px;float:left;height:28px!important;line-height:28px!important;text-indent:0!important;margin:0 auto}
.popup_container .popup_main .popup_title button{background:url(../images/file/pop_close.png) no-repeat;width:17px;height:17px;float:right;border:0;cursor:pointer;margin:5px 5px 0 0}
.popup_container .popup_main .popup_title button:hover{background-position:-19px 0}
.popup_container .popup_main .popup_container_tips{margin:20px 20px 0}
.popup_container .popup_main .global_tip_button{height:41px;width:100%;background:#F1F1F1;border-top:1px solid #E9E9E9;text-align:center;position:relative}
.popup_container .popup_main .global_tip_button button{margin-right:10px;line-height:21px;margin-top:10px;text-align:center}
.popup_container .popup_main .alert{background:url(statics/info.gif) no-repeat}
.popup_container .popup_main .confirm{background:url(statics/important.gif) no-repeat}
.popup_container .popup_main .prompt{background:url(statics/help.gif) no-repeat}
.popup_container .popup_main .gb_tips{font-size:12px!important;text-align:left;margin:0!important;padding:0 0 10px 50px}
.popup_container .popup_main .gb_tips p{line-height:21px;font-size:12px!important;margin:0 0 15px}
.prompt_txt{border:1px solid #A7A6AA;width:220px;height:19px}
.prompt_err{display:none;background:#fffaea url(statics/erroralert.gif) no-repeat 8px center;_padding-top:4px;border:1px solid #ffe591;font-size:12px;padding:3px 20px 4px 34px}
</style>
<script type="text/javascript">
$(function(){
		Util.Form.initValiLayout(); //表单初始化
		Util.Form.inputDisabled(false);

		$("#product_isfree option").each(function(){
	    if($(this).val() == <{$product.product_isfree}>)
		    {
		        $(this).attr("selected","selected");
		    }
		}); 
		
		$("#product_type option").each(function(){
	    if($(this).val() == <{$product.product_type}>)
		    {
		        $(this).attr("selected","selected");
		    }
		}); 
		
		$("#product_state option").each(function(){
	    if($(this).val() == <{$product.product_state}>)
		    {
		        $(this).attr("selected","selected");
		    }
		}); 
		
		$("#product_is_recommend option").each(function(){
	    if($(this).val() == <{$product.product_is_recommend}>)
		    {
		        $(this).attr("selected","selected");
		    }
		}); 
		
		var form_action=$("#product_form").attr("action");
		if(form_action == "./product.php?action=EditProduct")
		{
			$("#product_cbsid").attr("readonly","readonly");
		}
});
 function GetCBSDate()
 {
	var product_cbsid = $("#product_cbsid").val();
	var form_action=$("#product_form").attr("action");
	if(product_cbsid > 0)
	{
		$("#product_sn").val("");
		$("#product_version").val("");
		$("#product_name").val("");
		$("#product_price").val("");
		$("#product_brand").val("")
		
		$.post("./product.php?action=GetCBSData",{pcbs_id:product_cbsid,form_action:form_action},function(data)
		{
			var product_date=data;
			if(product_date['message']=='success')
			{
				$("#product_sn").val(product_date['product_sn']);
				$("#product_version").val(product_date['sale_version']);
				$("#product_name").val(product_date['product_name']);
				$("#product_price").val(product_date['price']);
				$("#product_brand").val(product_date['brand_name']);
				$("#product_cbsid").attr("readonly","readonly");
			}
			else
			{
				alert(product_date['message']);
			}
		},'json');
	}
	else
	{
		alert("请输入CBS产品ID!");
	}
 }
 
 function save_product()
 {
 	if(Util.ValiForm.formValiState())
 	{
 		$("#product_form").submit();
 	}
 }
 
 function reset_product()
 {
 	$("#product_cbsid").attr("readonly","");
 }
 
 function getproductlist()
 {
 	var product_list = $("#product_recomm").val();
	jIframe('', '所有产品列表', {
				width: 750,
				height: 345,
				src: './product.php?action=RecommProduct&product_list='+product_list,
				ID: 'all_product',
				box_btn:true,
                callback:add_okbtn
			});
 }
 function getproductlisttwo()
 {
 	var product_list = $("#product_rel").val();
	jIframe('', '所有产品列表', {
				width: 750,
				height: 345,
				src: './product.php?action=RecommProductTwo&product_list='+product_list,
				ID: 'all_product_two',
				box_btn:true,
                callback:add_okbtn_two
			});
 }
 
 
 function add_okbtn()
 {
 	var cnt = document.getElementById("all_product").contentWindow.get_checked_product();
	$("#product_recomm").val(cnt);
	jClose();
 }
 
 function add_okbtn_two()
 {
 	var cnt = document.getElementById("all_product_two").contentWindow.get_checked_product();
	$("#product_rel").val(cnt);
	jClose();
 }
</script>
</head>
<body>
<div id="tabbar-div">
      <p>
     
      </p>
    </div>
<div id="tabbody-div"  style=" width:1100px;">
<form id="product_form" vali="3" action="<{$actionurl}>" method="post">
  <table table align="center" width="90%"  cellpadding="1" cellspacing="1" id="table_info">
    <tr>
      <td class="tdone" width="30%" >CBS产品ID:</td>
      <td class="tdtwo" width="60%" ><input type="text" size="30" maxlength="11"  style="float:left;margin-left:10px;" vali="num" id="product_cbsid" errormsg="请输入正确的CBS产品ID！" name="product[product_cbsid]" value="<{$product.product_cbsid}>"  />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="button" id="cbs" onclick="GetCBSDate()" value="获取CBS数据"></td>
   </tr>
   <tr>
      <td class="tdone" >产品编号:</td>
      <td class="tdtwo" ><input type="text" size="30" style="float:left;margin-left:10px;" id="product_sn" vali="intege1" errormsg="产品编号为正整数且不能为空！"  maxlength="11" readonly="readonly" name="product[product_sn]" value="<{$product.product_sn}>"/></td> 
    </tr>
    <tr>
      <td class="tdone" >产品名称:</td>
      <td class="tdtwo" ><input type="text" size="30" style="float:left;margin-left:10px;" id="product_name" vali="specialstr" errormsg="请输入正确的产品名称！"  maxlength="100" readonly="readonly" name="product[product_name]" value="<{$product.product_name}>" /></td>
      </tr>
    <tr>
      <td class="tdone" >版本号</td>
      <td class="tdtwo" ><input type="text" id="product_version" size="30" errormsg=""  maxlength="50" readonly="readonly" name="product[product_version]" value="<{$product.product_version}>" /></td>
    </tr>
    <tr>
      <td class="tdone" >所属品牌:</td>
      <td class="tdtwo" ><input type="text" size="30" style="float:left;margin-left:10px;"  id="product_brand" errormsg="请输入正确的品牌名称！"  vali="name" maxlength="50" rate="0" readonly="readonly" name="product[product_brand]" value="<{$product.product_brand}>" /></td>
      </tr>
    <tr>
      <td class="tdone" >价格:</td>
      <td class="tdtwo" ><input type="text" size="30" id="product_price" vali="" errormsg=""  vali="decmal1" maxlength="10" readonly="readonly" name="product[product_price]" value="<{$product.product_price}>" /></td>
    <td width="40%"></td>
    </tr>
    <tr>
      <td class="tdone" >价格说明:</td>
      <td colspan="3" class="tdtwo"><textarea style="width:425px; height:70px;" id="product_price_des" name="product[product_price_des]"><{$product.product_price_des}></textarea></td>
    </tr>
    <tr>
      <td class="tdone" >存储平台表ID</td>
      <td class="tdtwo" ><input type="text" size="30" id="product_os" errormsg="" maxlength="50" rate="0" name="product[product_os]" value="<{$product.product_os}>" /></td>
      </tr>
    <tr>
      <td class="tdone" >是否免费</td>
      <td class="tdtwo" ><select  id="product_isfree" name="product[product_isfree]" style="width:215px;" >
      								<option value="0">不免费</option>
                                    <option value="1">免费</option>
      								</select></td>
      
    </tr>
    <tr>
      <td class="tdone" >是否试用</td>
      <td class="tdtwo" ><select id="product_type" name="product[product_type]" style="width:215px;" >
      								<option value="0">不试用</option>
                                    <option value="1">试用</option>
      								</select></td>
      </tr>
    <tr>
      <td class="tdone" >对应产品</td>
      <td class="tdtwo" ><input type="text" size="30" errormsg="" maxlength="100" rate="0" id="product_rel" readonly="readonly" name="product[product_rel]" style="width:175px;" value="<{$product.product_rel}>" /><input type="button" value="选择" onclick="getproductlisttwo()"></td>
      
    </tr>
    <tr>
      <td class="tdone" >系统支持说明-简单</td>
      <td colspan="3" class="tdtwo"><textarea style="width:425px; height:70px;" id="product_support_intro" name="product[product_support_intro]"><{$product.product_support_intro}></textarea></td>
    </tr>
    <tr>
      <td class="tdone" >系统支持说明-完整</td>
      <td colspan="3" class="tdtwo"><textarea style="width:425px; height:70px;" id="product_support_content" name="product[product_support_content]"><{$product.product_support_content}></textarea></td>
    </tr>
    <tr>
      <td class="tdone" >Icon图标-小</td>
      <td class="tdtwo" ><input type="text" size="30" id="product_icon_min" name="product[product_icon_min]" errormsg="" maxlength="100" rate="0" value="<{$product.product_icon_min}>"/></td>
      </tr>
    <tr>
      <td class="tdone" >Icon图标-大</td>
      <td class="tdtwo" ><input type="text" size="30" id="product_icon_max" name="product[product_icon_max]" errormsg="" maxlength="100" rate="0"  value="<{$product.product_icon_max}>"/></td>
      <td width="40%"></td>
    </tr>
    <tr>
      <td class="tdone" >Box盒子图-小</td>
      <td class="tdtwo" ><input type="text" size="30" id="product_box_min" name="product[product_box_min]" errormsg="" maxlength="100" rate="0" value="<{$product.product_box_min}>" /></td>
      </tr>
    <tr>
      <td class="tdone" >Box盒子图-中</td>
      <td class="tdtwo" ><input type="text" size="30" id="product_box_middle" name="product[product_box_middle]" errormsg="" maxlength="100" rate="0" value="<{$product.product_box_middle}>"/></td>
    </tr>
    <tr>
      <td class="tdone" >Box盒子图-大</td>
      <td class="tdtwo" ><input type="text" size="30" id="product_box_big" name="product[product_box_big]" errormsg="" maxlength="100" rate="0" value="<{$product.product_box_big}>" /></td>
      </tr>
    <tr>
      <td class="tdone" >Guide Demo URL</td>
      <td class="tdtwo" ><input type="text" size="30" id="product_video_guide" name="product[product_video_guide]" value="<{$product.product_video_guide}>" /></td>
    </tr>
    <tr>
      <td class="tdone">Promo Demo URL</td>
      <td class="tdtwo" ><input type="text" size="30" id="product_video_promo" errormsg="" maxlength="100" rate="0" name="product[product_video_promo]" value="<{$product.product_video_promo}>" /></td>
	</tr>
    <tr>
      <td class="tdone" >Awards URL</td>
      <td class="tdtwo" ><input type="text" size="30" id="product_pic_awards" errormsg="" maxlength="100" rate="0" name="product[product_pic_awards]" value="<{$product.product_pic_awards}>" /></td>
    </tr>
    <tr>
      <td class="tdone">产品标语</td>
      <td colspan="3" class="tdtwo"><textarea style="width:425px; height:70px;" id="product_ad" name="product[product_ad]"><{$product.product_ad}></textarea></td>
    </tr>
    <tr>
      <td class="tdone">产品简介（短描述）</td>
      <td colspan="3" class="tdtwo"><textarea style="width:425px; height:70px;" id="product_intro" name="product[product_intro]"><{$product.product_intro}></textarea></td>

    </tr>
    <tr>
      <td class="tdone">产品简介（长描述）</td>
      <td colspan="3" class="tdtwo"><textarea style="width:425px; height:70px;" id="product_content" name="product[product_content]"><{$product.product_content}></textarea></td>
    </tr>
    <tr>
      <td class="tdone" width="8%">产品Key Feature点</td>
      <td colspan="3" class="tdtwo"><textarea style="width:425px; height:70px;" id="product_key_feature" name="product[product_key_feature]"><{$product.product_key_feature}></textarea></td>
    </tr>
    <tr>
      <td class="tdone" >对应产品</td>
      <td class="tdtwo" ><input type="text" size="30" errormsg="" maxlength="100" rate="0" id="product_recomm" readonly="readonly" name="product[product_recomm]" style="width:175px;" value="<{$product.product_recomm}>" /><input type="button" value="选择" onclick="getproductlist()"></td>
	</tr>
    <tr>
      <td class="tdone" >产品头部banner图</td>
      <td class="tdtwo"><input type="text" size="30" id="product_head_pic" name="product[product_head_pic]" errormsg="" maxlength="100" rate="0" value="<{$product.product_head_pic}>" /></td>
    </tr>
    <tr>
      <td class="tdone" >产品页面信息</td>
      <td class="tdtwo" ><input type="text" size="30" id="product_pages" errormsg="" maxlength="100" rate="0" name="product[product_pages]" value="<{$product.product_pages}>" /></td>
      </tr>
    <tr>
      <td class="tdone" >推荐状态</td>
      <td class="tdtwo" ><select id="product_is_recommend" name="product[product_is_recommend]" style="width:215px;" >
      								<option value="0">不推荐</option>
                                    <option value="1">推荐</option>
      								</select></td>
    </tr>  
	<tr>
      <td class="tdone" >发布状态</td>
      <td class="tdtwo" ><select id="product_state" name="product[product_state]" style="width:215px;" >
      								<option value="0">未发布</option>
                                    <option value="1">发布</option>
      								</select></td>
    </tr>
    <tr>
    <td class="tdone" ><input type="hidden" name="product[product_id]" id="product_id" value="<{$product.product_id}>"></td>
      <td class="tdtwo" ></td>
      <td class="tdone" ></td>
      <td class="tdtwo" ></td>
    </tr>
  </table>
   <div  style="margin-left:380px; margin-top:20px;">
          <input type="button" onclick="save_product()" value="保存">
          <input type="reset"  onclick="reset_product()" value=" 重置 ">
        </div>
</form>
</div>
</body>
</html>
